import { z } from 'zod';
import { zodToJsonSchema } from 'zod-to-json-schema';
import {qwen} from "../models";

const Country = z.object({
    name: z.string(),
    capital: z.string(),
    languages: z.array(z.string()),
});

const model = qwen.withStructuredOutput(zodToJsonSchema(Country))

const response = await model.invoke("Tell me about Canada.")

// const country = Country.parse(JSON.parse(response.message.content));
console.log(response);